#!/usr/bin/python
#-*- coding: utf-8-*-

import math

class Point(object):
  """Einfache 3D Punkte"""
  def __init__(self, x=0, y=0, z=0):
    self._x = x * 1.
    self._y = y * 1.
    self._z = z * 1.

  def __repr__(self):
    return "p("+str(self._x)+", "+str(self._y)+", "+str(self._z)+")"
  
  def _get_x(self):        
    return self._x
  def _set_x(self, x):
    self._x = x * 1.
  x = property(_get_x, _set_x)
    
  def _get_y(self):
    return self._y
  def _set_y(self, y):
    self._y = y * 1.
  y = property(_get_y, _set_y)
  
  def _get_z(self):
    return self._z
  def _set_z(self, z):
    self._z = z * 1.
  z = property(_get_z, _set_z)
  
if __name__ == "__main__":
  p = Point(1,2,3)
  print p
  p.x = 5
  print p
  
